package lhy.orm.model;

import java.io.Serializable;

public class ForeignKey implements Serializable {
    private String originalFieldName;
    private String sourceColumn;
    private String sourceTable;
    private String sourceClass;
    private String targetColumn;
    private String targetTable;
    private String targetClass;

    public String getSourceColumn() {
        return sourceColumn;
    }

    public void setSourceColumn(String sourceColumn) {
        this.sourceColumn = sourceColumn;
    }

    public String getSourceTable() {
        return sourceTable;
    }

    public void setSourceTable(String sourceTable) {
        this.sourceTable = sourceTable;
    }

    public String getSourceClass() {
        return sourceClass;
    }

    public void setSourceClass(String sourceClass) {
        this.sourceClass = sourceClass;
    }

    public String getTargetColumn() {
        return targetColumn;
    }

    public void setTargetColumn(String targetColumn) {
        this.targetColumn = targetColumn;
    }

    public String getTargetTable() {
        return targetTable;
    }

    public void setTargetTable(String targetTable) {
        this.targetTable = targetTable;
    }

    public String getTargetClass() {
        return targetClass;
    }

    public String getOriginalFieldName() {
        return originalFieldName;
    }

    public void setOriginalFieldName(String originalFieldName) {
        this.originalFieldName = originalFieldName;
    }

    @Override
    public String toString() {
        return "ForeignKey{" +
                "originalFieldName='" + originalFieldName + '\'' +
                ", sourceColumn='" + sourceColumn + '\'' +
                ", sourceTable='" + sourceTable + '\'' +
                ", sourceClass='" + sourceClass + '\'' +
                ", targetColumn='" + targetColumn + '\'' +
                ", targetTable='" + targetTable + '\'' +
                ", targetClass='" + targetClass + '\'' +
                '}';
    }

    public void setTargetClass(String targetClass) {
        this.targetClass = targetClass;
    }

    public ForeignKey(String originalFieldName, String sourceColumn, String sourceTable, String sourceClass, String targetColumn, String targetTable, String targetClass) {
        this.originalFieldName = originalFieldName;
        this.sourceColumn = sourceColumn;
        this.sourceTable = sourceTable;
        this.sourceClass = sourceClass;
        this.targetColumn = targetColumn;
        this.targetTable = targetTable;
        this.targetClass = targetClass;
    }
}
